package com.huang.springboot.dao;

import com.huang.springboot.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author yili_gi
 */
@Mapper
@Repository
public interface UserMapper {

    /**
     * 查询所有用户
     * @return
     */
    List<User> queryUsers();

    /**
     * 通过id查询用户
     * @param userID
     * @return
     */
    User queryUserByID(@Param("userID")int userID);

    /**
     * 通过用户名查询用户
     * @param userName
     * @return
     */
    User queryUserByName(@Param("userName")String userName);


}
